from cnocr import CnOcr
from datetime import datetime
import time
# 将来简化一点代码
def sleep(s):
    # 唯一一个地方的例外
    time.sleep(s)
    return

print(datetime.now().strftime("%Y-%m-%d %H:%M:%S.%f"))
# ocr = CnOcr()
# ocr = CnOcr(det_model_name='en_PP-OCRv3_det')
# ocr = CnOcr(rec_model_name='densenet_lite_114-fc')
ocr = CnOcr(rec_model_name='densenet_lite_136-gru')
for i in range(0,1):
    # res = ocr.ocr(r'd:/yehaibo_Blood.jpg')
    res = ocr.ocr(r'E:\game\World of Warcraft\_retail_\Screenshots\WoWScrnShot_101622_142447.jpg')
    # res = ocr.ocr('../opencv/test2.jpg')
    # print(res)
    for list in res:
        print(list)
    print(datetime.now().strftime("%Y-%m-%d %H:%M:%S.%f"))
    sleep(1)


